import { createApp } from 'vue'
import '@/style/index.scss'
import App from './App.vue'
import router from './router'
// import Vant from 'vant'
// import 'vant/lib/index.css'
import VConsole from 'vconsole'
// import i18n from './lang'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'


const app = createApp(App)
app.use(ElementPlus)

//apple登录redirectURI
let redirectURI = 'http://zhandui.mguit.com/'

//如果是开发、测试环境，打开vconsole
if (import.meta.env.MODE == 'development' || import.meta.env.MODE == 'staging') {
  redirectURI = 'http://zhandui.mguit.com/'
  new VConsole()
}

//google登录
import GoogleSignInPlugin from 'vue3-google-signin'
app.use(GoogleSignInPlugin, {
  clientId: '664847893527-qt6aguq3pu6kchammhcaomlbl0hqrmn6.apps.googleusercontent.com',
})

//apple登录
import VueAppleLogin from 'vue-apple-login'
app.use(VueAppleLogin, {
  clientId: 'com.web.syachat',
  response_mode: 'form_post',
  response_type: 'code',
  scope: 'name email',
  redirectURI: redirectURI,
  state: Date.now().toString(),
  usePopup: true,
})

app.use(router)
// app.use(Vant)
// app.use(i18n)

app.mount('#app')
